package com.best.oasis.settlement.service.site;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.best.oasis.settlement.common.entity.site.Site;
import com.best.oasis.settlement.common.so.site.SiteSO;
import com.best.oasis.settlement.common.vo.site.SiteVO;
import com.best.oasis.settlement.dao.site.SiteDao;
import com.best.oasis.settlement.service.base.BaseServiceImpl;
import com.best.oasis.settlement.util.page.PageList;

@Service
public class SiteServiceImpl extends BaseServiceImpl<Site, SiteVO, Long> implements SiteService {
	@Autowired
    private SiteDao siteDao;
    
    @Override
    public void afterConstruct() {
        super.setBaseDao(siteDao);
        super.setEntityClass(Site.class);
        super.setEntityVOClass(SiteVO.class);

    }

	@SuppressWarnings("unchecked")
	@Override
	public PageList<SiteVO> getPageList(SiteSO so) {
		PageList<SiteVO> result = new PageList<SiteVO>();
        result = orikaBeanMapper.convertPageList(siteDao.getPageList(so), entityVOClass);
        return result;
	}

}
